package edu.chalmers.mde.schedulesystem;

public class ScheduleSystem {
	private String cityA;
	private String cityB;
	private float arrivalTime;
	private float departureTime;
	

	public ScheduleSystem( String cityA, String cityB) {
		this.cityA = cityA;
		this.cityB = cityB;
		//this.duration = duration;

	}

	public float getDuration() {
		return (float)arrivalTime-departureTime;
	}

	public void setDuration(float duration) {
	}

	public String getCityA() {
		return cityA;
	}

	public void setCityA(String cityA) {
		this.cityA = cityA;
	}

	public String getCityB() {
		return cityB;
	}

	public void setCityB(String cityB) {
		this.cityB = cityB;
	}

	public float getArrivalTime() {
		return arrivalTime;
	}

	public void setArrivalTime(float ArrivalTime) {
		this.arrivalTime =  ArrivalTime;
	}

	public float getDepartureTime() {
		return departureTime;
	}

	public void setDepartureTime(float DepartureTime) {
		this.departureTime =  DepartureTime;
	}
	public String toString(){
		return "DepartureTime from" + " " + cityA + ":" + departureTime + "-" + "ArrivalTime at" +" "+ cityB + ":" +  arrivalTime +  ":" + "\nDurationTime :" + getDuration();
	}
public static void main(String[] args) {
	
	ScheduleSystem s = new ScheduleSystem("Goteborg","Stockholm");
	s.setDepartureTime(800);
	s.setArrivalTime(1200);
	System.out.println(s);
	ScheduleSystem a = new ScheduleSystem("Uppsala" , "Linkopin");
	a.setDepartureTime(900);
	a.setArrivalTime(1000);
	System.out.println(a);
	
}
}
